package com.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * Created by hdu_huang on 2020/10/17.
 */
public interface UserMapper {

    @Select("SELECT COUNT(*) from tbl_user where id < #{id, jdbcType = INTEGER}")
    int getCount(@Param("id") int id);


    Map<String, Object> testOgnl(Integer id);

    Map<String, Object> testOgnl();

    /**
     * `json_data` json DEFAULT NULL COMMENT 'json测试',
     * 测试mysql json类型   需要自定义 TypeHandler   BaseTypeHandler
     */
    @Select("SELECT * FROM test where ID = #{id}")
    List<Map<String, Object>> testJson(@Param("id") Integer id);

}
